local hx__bieji = fk.CreateSkill {
  name = "hx__bieji",
  tags = { Skill.Compulsory, }
}

hx__bieji:addEffect(fk.AfterSkillEffect, {
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(hx__bieji.name) and target and target ~= player and data.skill.name ~= "hx__bieji"
    and not target:hasSkill(hx__bieji.name) and table.contains(target:getSkillNameList(), data.skill.name)
    and player:usedSkillTimes(hx__bieji.name) < 20
  end,
  on_use = function(self, event, target, player, data)
    local room = target.room
    player:broadcastSkillInvoke(hx__bieji.name)
    room:notifySkillInvoked(player, hx__bieji.name, "offensive", {target.id})
    room:doIndicate(player, {target})
    room:addPlayerMark(target, "@hx__bieji-turn", 1)
    if target:getMark("@hx__bieji-turn") >= 5 then
      player.room:killPlayer({who = target})
    end
  end,
})

return hx__bieji
